home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / VideoToolbox 96.06.15 / (Demos) / LuminanceRecord1.h < prev    next >
Text File  |  1994-10-17  |  3KB  |  68 lines

  1. /* This LuminanceRecord1.h file is a description of a monitor produced by the CalibrateLuminance program. */
  2. /* This file may be #included in any C program. It simply fills in a LuminanceRecord data structure. */
  3. /* The theory is described by Pelli & Zhang (1991). The data structure is defined in Luminance.h.  */
  4. /* CalibrateLuminance and Luminance.h are part of the VideoToolbox software. */
  5. /* Pelli & Zhang (1991) Accurate control of contrast on microcomputer displays. */
  6. /* Vision Research, 31:1337-1360. */
  7. /* The VideoToolbox software is available, free for research purposes, from Denis Pelli. */
  8. /* Institute for Sensory Research, Syracuse University, Syracuse, NY 13244-5290. */
  9. LR.screen=1;    /* device=GetScreenDevice(LR.screen); */
  10. /* Caution: the screen number used here and in GetScreen Device is NOT the same as */
  11. /* displayed by the Monitors cdev in the Control Panel. Sorry. The most obvious difference */
  12. /* is that GetScreenDevice always assigns 0 to the main screen, the one with the menu bar. */
  13. LR.date="3:09 PM Friday, October 16, 1992";
  14. LR.id="5111767";
  15. LR.name="signal";
  16. LR.notes="manoj, lights off, photometer 1 inch from screen";
  17. LR.dpi=76.0;    /* pixels per inch */
  18. LR.Hz=66.67;    /* frames per second */
  19. LR.units="cd/m^2";
  20. /* coefficients of polynomial fit */
  21. LR.coefficients=9;    /* # of coefficients in polynomial fit */
  22. /* L(V)=p[0]+p[1]*V+p[2]*V*V+ . . . ±polynomialError */
  23. LR.p[0]=1.28201e-14;
  24. LR.p[1]=8.25776e-13;
  25. LR.p[2]=5.00064e-11;
  26. LR.p[3]=2.51138e-09;
  27. LR.p[4]=7.98055e-08;
  28. LR.p[5]=-2.04184e-09;
  29. LR.p[6]=1.79181e-11;
  30. LR.p[7]=-6.3791e-14;
  31. LR.p[8]=8.10888e-17;
  32. LR.polynomialError=  0.2263;    /* RMS error of fit */
  33. /* coefficients of quadratic fit */
  34. /* L(V)=q[0]+q[1]*V+q[2]*V*V±quadraticError */
  35. LR.q[0]=4.86285;
  36. LR.q[1]=-0.201266;
  37. LR.q[2]=0.00125998;
  38. LR.quadraticError=  2.5493;    /* RMS error of fit */
  39. /* coefficients of power law fit */
  40. /* L(V)=power[0]+Rectify(power[1]+power[2]*V)^power[3]±powerError */
  41. /* where Rectify(x)=x if x≥0, and Rectify(x)=0 otherwise */
  42. /* Pelli & Zhang (1991) Eqs.9&10 use symbols v=V/255, alpha=power[0], beta=power[1], kappa=power[2]*255, gamma=power[3] */
  43. LR.power[0]=-0.0615421;
  44. LR.power[1]=-3.38554;
  45. LR.power[2]=0.0305017;
  46. LR.power[3]=2.48866;
  47. LR.powerError=  0.2616;    /* RMS error of fit */
  48. /* coefficients of power law fit, with fixed exponent */
  49. /* L(V)=fixedPower[0]+Rectify(fixedPower[1]+fixedPower[2]*V)^fixedPower[3]±fixedPowerError */
  50. LR.fixedPower[0]=-0.764058;
  51. LR.fixedPower[1]=-2.96785;
  52. LR.fixedPower[2]=0.0310164;
  53. LR.fixedPower[3]=  2.28;
  54. LR.fixedPowerError=  1.1986;    /* RMS error of fit */
  55. LR.r=0.0282406;
  56. LR.g=0.149883;
  57. LR.b=0.821877;
  58. LR.gainAccuracy=-0.0337905;
  59. LR.gm=3.85543;    /* The monitor's contrast gain. */
  60. LR.VMin=  0;    /* minimum value that can be loaded into DAC */
  61. LR.VMax=255;    /* maximum value that can be loaded into DAC */
  62. LR.LMin=   -0.06;    /* luminance at VMin */
  63. LR.LMax=   39.70;    /* luminance at VMax */
  64. LR.LBackground=   9.731;    /* background luminance during calibration */
  65. LR.VBackground=193;    /* background number used during calibration */
  66. LR.rangeSet=0;    /* indicate that range parameters have yet to be set */
  67. LR.L.exists=0;    /* indicate that luminance table has yet to be initialized */
  68.